/* Tailwind CSS 指令放在最前面 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 然后是 Ant Design 样式
@import 'antd/dist/reset.css'; */

/* 自定义样式覆盖 */
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}


:root {
  /* 原有变量 */
  --foreground-rgb: 0, 0, 0;
  --background-start-rgb: 214, 219, 220;
  --background-end-rgb: 255, 255, 255;
  
  /* ============ 新增：统一配色系统变量 ============ */
  
  /* 基础色彩 */
  --color-primary: #03d2fd;
  --color-secondary: #1cfeba;
  --color-accent: #8040ff;
  --color-success: #1cfeba;
  --color-warning: #faad14;
  --color-error: #ff4d4f;
  --color-info: #03d2fd;
  
  /* BI大屏配色 */
  --bi-background: #0f1527;
  --bi-card-bg: rgba(3, 16, 45, 0.6);
  --bi-hover-bg: rgba(3, 29, 69, 0.8);
  --bi-overlay-bg: rgba(3, 16, 45, 0.95);
  
  /* 文字颜色 */
  --bi-text-primary: #ffffff;
  --bi-text-secondary: rgba(255, 255, 255, 0.85);
  --bi-text-accent: #03d2fd;
  --bi-text-muted: rgba(255, 255, 255, 0.6);
  
  /* 边框颜色 */
  --bi-border-primary: #03d2fd;
  --bi-border-secondary: #1cfeba;
  --bi-border-muted: rgba(3, 210, 253, 0.3);
  
  /* 按钮颜色 */
  --bi-button-primary: rgba(0, 168, 255, 0.4);
  --bi-button-primary-hover: rgba(0, 168, 255, 0.6);
  --bi-button-secondary: rgba(3, 210, 253, 0.1);
  --bi-button-border: #00a8ff;
  
  /* 排行榜颜色 */
  --ranking-gold: #FFD700;
  --ranking-silver: #C0C0C0;
  --ranking-bronze: #CD7F32;
  --ranking-danger: rgba(255, 0, 0, 0.4);
  
  /* 动画变量 */
  --animation-duration-fast: 0.15s;
  --animation-duration-normal: 0.3s;
  --animation-duration-slow: 0.5s;
  --animation-easing: ease-in-out;
  
  /* 渐变色变量 */
  --gradient-1: #2ac6ff66;
  --gradient-2: #00a8ff66;
  --gradient-3: #41b0ff66;
  --gradient-4: #148cff66;
  --gradient-5: #308aff66;
  --gradient-6: #507dff66;
  --gradient-7: #6060ff66;
  --gradient-8: #8040ff66;
}

@media (prefers-color-scheme: dark) {
  :root {
    --foreground-rgb: 255, 255, 255;
    --background-start-rgb: 0, 0, 0;
    --background-end-rgb: 0, 0, 0;
  }
}

.disabled-class {
  pointer-events: none;
  opacity: 0.5;
}

/* 调整Ant Design表格分页与底部的间距 */
.ant-table-wrapper .ant-table-pagination.ant-pagination {
  margin-bottom: 8px !important;
  margin-top: 12px !important;
}

/* 针对特定的系统日志页面样式调整 */
.ant-table-wrapper .ant-pagination {
  padding-bottom: 0 !important;
}

/* 专门针对系统日志表格的分页样式 */
.system-log-table .ant-table-wrapper .ant-pagination {
  margin-bottom: 2px !important;
  padding-bottom: 0 !important;
}

/* 覆盖Ant Design内部生成的样式 */
.system-log-table .ant-table-wrapper .ant-table-pagination {
  margin-bottom: 2px !important;
}

/* ============ 新增：统一样式工具类 ============ */

/* BI大屏通用样式 */
.bi-card {
  background-color: var(--bi-card-bg);
  border: 1px solid var(--bi-border-muted);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(3, 210, 253, 0.1);
  transition: all var(--animation-duration-normal) var(--animation-easing);
}

.bi-card:hover {
  background-color: var(--bi-hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(3, 210, 253, 0.2);
}

.bi-button-primary {
  background-color: var(--bi-button-primary);
  border: 1px solid var(--bi-button-border);
  color: var(--bi-text-primary);
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--animation-duration-normal) var(--animation-easing);
}

.bi-button-primary:hover {
  background-color: var(--bi-button-primary-hover);
  transform: translateY(-1px);
}

.bi-button-secondary {
  background-color: var(--bi-button-secondary);
  border: 1px solid var(--bi-border-primary);
  color: var(--color-primary);
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--animation-duration-normal) var(--animation-easing);
}

.bi-button-secondary:hover {
  background-color: rgba(3, 210, 253, 0.2);
}

/* 文字样式类 */
.bi-text-primary {
  color: var(--bi-text-primary);
}

.bi-text-secondary {
  color: var(--bi-text-secondary);
}

.bi-text-accent {
  color: var(--bi-text-accent);
  font-weight: bold;
}

.bi-text-muted {
  color: var(--bi-text-muted);
}

/* 渐变背景类 */
.bi-gradient-1 { background-color: var(--gradient-1); }
.bi-gradient-2 { background-color: var(--gradient-2); }
.bi-gradient-3 { background-color: var(--gradient-3); }
.bi-gradient-4 { background-color: var(--gradient-4); }
.bi-gradient-5 { background-color: var(--gradient-5); }
.bi-gradient-6 { background-color: var(--gradient-6); }
.bi-gradient-7 { background-color: var(--gradient-7); }
.bi-gradient-8 { background-color: var(--gradient-8); }

/* 排行榜样式类 */
.ranking-gold {
  background-color: var(--ranking-gold);
  color: #000;
  font-weight: bold;
}

.ranking-silver {
  background-color: var(--ranking-silver);
  color: #000;
  font-weight: bold;
}

.ranking-bronze {
  background-color: var(--ranking-bronze);
  color: #000;
  font-weight: bold;
}

/* 动画工具类 */
.transition-fast {
  transition: all var(--animation-duration-fast) var(--animation-easing);
}

.transition-normal {
  transition: all var(--animation-duration-normal) var(--animation-easing);
}

.transition-slow {
  transition: all var(--animation-duration-slow) var(--animation-easing);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(3, 210, 253, 0.2);
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* 边框样式类 */
.bi-border-primary {
  border: 1px solid var(--bi-border-primary);
}

.bi-border-secondary {
  border: 1px solid var(--bi-border-secondary);
}

.bi-border-muted {
  border: 1px solid var(--bi-border-muted);
}

/* ============ 数据大屏组件样式 ============ */

/* 表格样式 */
.custom-table .ant-table {
  background-color: transparent !important;
  color: #fff !important;
}

.custom-table .ant-table-thead > tr > th {
  background-color: rgba(3, 29, 69, 0.8) !important;
  color: #03d2fd !important;
  border-bottom: 1px solid rgba(28, 254, 186, 0.2) !important;
  font-size: 16px !important;
}

.custom-table .ant-table-tbody > tr > td {
  background-color: transparent !important;
  border-bottom: 1px solid rgba(28, 254, 186, 0.2) !important;
  color: #fff !important;
}

.custom-table .ant-table-tbody > tr.ant-table-row:hover > td {
  background-color: rgba(3, 29, 69, 0.8) !important;
}

/* 标签样式 */
.ant-tag {
  margin-right: 0 !important;
}

/* 列表样式 */
.ant-list-item {
  padding: 8px 0 !important;
}

.ant-list-item-meta-title {
  margin-bottom: 4px !important;
  color: #fff !important;
}

.ant-list-item-meta-description {
  color: #aaa !important;
}

/* 自适应调整 */
@media (max-width: 1600px) {
  .text-\[30px\] {
    font-size: 24px !important;
  }
  
  .text-\[24px\] {
    font-size: 20px !important;
  }
  
  .text-\[20px\] {
    font-size: 18px !important;
  }
  
  .text-\[18px\] {
    font-size: 16px !important;
  }
  
  .text-\[16px\] {
    font-size: 14px !important;
  }
  
  .text-\[14px\] {
    font-size: 12px !important;
  }
}

/* 增强动画效果 */
@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* 增强按钮样式 */
.custom-button {
  background: linear-gradient(to right, #03d2fd, #1cfeba) !important;
  border: none !important;
  color: #fff !important;
  font-weight: bold !important;
  transition: all 0.3s !important;
}

.custom-button:hover {
  box-shadow: 0 0 10px rgba(3, 210, 253, 0.5) !important;
  transform: translateY(-2px) !important;
}

/* 增强卡片悬停效果 */
.hover-effect {
  transition: all 0.3s;
}

.hover-effect:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(3, 210, 253, 0.3);
}

/* 闪烁动画 */
@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

.blink {
  animation: blink 2s infinite;
}

/* 旋转动画 */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rotate {
  animation: rotate 10s linear infinite;
}

/* 分段控制器样式 */
.ant-segmented-item-selected {
  background-color: #03d2fd !important;
}

.ant-segmented-item:hover:not(.ant-segmented-item-selected):not(.ant-segmented-item-disabled){
  color: #03d2fd !important;
}

/* 全局去掉滚动条 */
/* Webkit browsers (Chrome, Safari) */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Firefox */
* {
  scrollbar-width: none;
}

/* IE and Edge */
* {
  -ms-overflow-style: none;
}